import * as toast from "@/helper/un/toast";

export const $un = {
  ...toast,
  /**
   * 阻塞睡眠，需配合 await
   * @param milliseconds 堵塞时间，单位毫秒
   */
  sleep: function (milliseconds = 30) {
    return new Promise<void>((resolve) => {
      setTimeout(() => {
        resolve();
      }, milliseconds);
    });
  }
}
